package com.demo2do.fms.entity.supplier.common;

import com.demo2do.core.utils.Alias;

/**
 * 服务供方操作记录
 * 
 * @author Wy
 */
@Alias("SupplierEventType")
public enum SupplierEventType {
    
    CREATE("create", "引入供方"),
    
    INTRODUCE("introduce", "引入申报"),
    
    INTRODUCE_PASSED("introduct-passed", "通过引入申报"),
    
    INTRODUCE_REJECTED("introduct-rejected", "驳回引入申报"),
    
    CHANGE("change", "变更申报"),
    
    CHANGE_PASSED("changing-pass", "通过变更申报"),
    
    CHANGE_REJECTED("changing-rejected", "驳回变更申报"),
    
    DELETE("delete", "删除");

    private String alias;
    
    private String description;

    /**
     * @param alias
     * @param description
     */
    private SupplierEventType(String alias, String description) {
        this.alias = alias;
        this.description = description;
    }
    
    /**
     * 
     * @param alias
     * @return
     */
    public static SupplierEventType aliasOf(String alias){
        for(SupplierEventType auditStatus : SupplierEventType.values()){
            if(auditStatus.getAlias().equals(alias)){
                return auditStatus;
            }
        }
        return null;
    }
    
    /**
     * 
     * @return  alias
     */
    public String getAlias() {
        return alias;
    }
    
    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

}